{% extends "base.html" %}

{% block content %}
<h2>{{ profile }}</h2>

{% if profile.bio %}
    <p>{{ profile.bio }}</p>
{% endif %}

<br />

<table class="table table-hover table-bordered">
    {% if profile.website %}
    <tr>
        <th>个人主页：</th>
        <td><a href="{{ profile.website }}">{{ profile.website }}</a></td>
    </tr>
    {% endif %}
    {% if profile.location %}
    <tr>
        <th>家庭住址：</th>
        <td>{{ profile.location }}</td>
    </tr>
    {% endif %}
    {% if profile.birthday %}
    <tr>
        <th>年龄：</th>
        <td>{{ profile.age }}</td>
    </tr>
    {% endif %}
</table>

{% if user.is_staff or user == profile.user %}
<a href="{% url 'accounts:setting' profile.user.id %}" class="btn btn-default">修改资料</a>
{% endif %}
{% endblock %}